package com.fwc.churchtracker.messaging;

import javax.servlet.ServletContext;

public class MessagingServiceFactory {

	public static MessagingService get(String toAddress, ServletContext servletContext) {
		if(toAddress.toLowerCase().startsWith("shout@")) {
			return new ShoutService(servletContext, toAddress);
		} else if(toAddress.toLowerCase().startsWith("register@")) {
			return new RegistrationService(servletContext, toAddress);
		} else {
			return new UnimplementedService(servletContext, toAddress);
		}
	}
	
}
